package great.project.simple;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(CustomAspect.class , UserService.class);

        final Object bean = annotationConfigApplicationContext.getBean("userService", UserService.class);
        System.err.println(bean.getClass().getName());
        final Object registered = ((UserService)bean).registered("张三", "1324567");
        System.out.println(registered);
        System.err.println("可以看到上面的红色的字体 ， 会看到 CGLIB的相关字样，因为没有实现接口如果实现接口则使用的JDK的动态代理");
    }

}
